pkg_name=xalga
git_commit=e2e594675d297a1257146969b2d83f5db99d7c7d
build_dir=$builds_dir_root/$pkg_name
pkg_dir=$pkgs_dir_root/$pkg_name
src_dir=$src_dir_root/$pkg_name
url=https://github.com/sylware/$pkg_name.git

#rm -Rf "$pkg_dir"
#cp -r "$src_dir" "$pkg_dir"
#
#cd "$pkg_dir"
#
#git checkout --force $git_commit
#git reset --hard
#
#export NOCONFIGURE=1
#./autogen.sh
#unset NOCONFIGURE

#rm -Rf "$build_dir"
#mkdir -p "$build_dir"
cd "$build_dir"

#export CFLAGS=-O0
#"$pkg_dir/configure"			\
#	--prefix=/			\
#	--disable-docs			\
#	--disable-devel-docs		\
#	--disable-aiglx			\
#	--disable-glx			\
#	--disable-dri			\
#	--disable-dri2			\
#	--disable-dri3			\
#	--disable-xorg			\
#	--disable-xvfb			\
#	--disable-xnest			\
#	--disable-xquartz		\
#	--disable-xwayland		\
#	--enable-xalga			\
#	--disable-xwin			\
#	--disable-install-setuid	\
#	--disable-tcp-transport		\
#	--with-gnu-ld
#unset CFLAGS

make

install_tmp_dir=/tmp/$pkg_name
rm -Rf "$install_tmp_dir"
mkdir -p "$install_tmp_dir"
make install "DESTDIR=$install_tmp_dir"

install_dirs "$builders_dir_root/$pkg_name/runtime.dirs"
install_files "$builders_dir_root/$pkg_name/runtime.files" "$install_tmp_dir"
elf_strip "$builders_dir_root/$pkg_name/elf-strip"

rm -Rf "$install_tmp_dir"
#rm -Rf "$build_dir"
#rm -Rf "$pkg_dir"
